<template>
  <div class="container">
    <yd-cell-group>
      <yd-cell-item>
        <span slot="left">商品名：</span>
        <yd-input
          slot="right"
          required
          type="text"
          maxlength="20"
          placeholder="请输入商品名"
        />
      </yd-cell-item>

      <yd-cell-item arrow type="label">
        <span slot="left">商品类型：</span>
        <select slot="right">
          <option value>请选择</option>
          <option value="1">火锅</option>
          <option value="2">甜点</option>
          <option value="3">生鲜</option>
        </select>
      </yd-cell-item>

      <yd-cell-item arrow type="label">
        <span slot="left">是否有折扣：</span>
        <select slot="right">
          <option value>请选择</option>
          <option value="1">是</option>
          <option value="0">否</option>
        </select>
      </yd-cell-item>

      <yd-cell-item>
        <span slot="left">价格：</span>
        <yd-input
          slot="right"
          required
          type="number"
          placeholder="请输入商品价格"
        />
      </yd-cell-item>

      <yd-cell-item>
        <span slot="left">折扣价：</span>
        <yd-input slot="right" type="number" placeholder="请输入折扣价" />
      </yd-cell-item>
    </yd-cell-group>

    <yd-button
      class="addButton"
      type="primary"
      size="large"
      @click.native="addGoods"
      >添加商品</yd-button
    >
  </div>
</template>
<script>
export default {
  name: 'addGoods',
  data() {
    return {};
  },
  methods: {
    addGoods() {}
  },
  mounted() {
    console.log(this.$route);
  }
};
</script>
<style lang="less" scoped>
.container {
  // padding: 0.1rem;
}
.addButton {
  height: 0.8rem;
  margin: 0.2rem 0;
}
</style>
